cc.Class({
    extends: cc.Component,
    properties: {
       level_num:{
            default:null,
            type:cc.Label,
       },
      
    },


    onLoad () {
        let e = this;
       
    },

    start () {

    },
    get_num(index){
        let e = this;
        let Level_number = index;
        e.level_num.string = parseInt(Level_number);
    },
    onClick_Item(){
        let e= this;
        DataMangrt.initData();
        let Level_number = this.node.name.substring(10);
        DataMangrt.level = parseInt(Level_number);
        // if (DataMangrt.level>DataMangrt.getData()) {
        //     let noUnlockedLable = cc.find("Canvas/Panel_LevelMagger/NoUnlockedView");
        //     noUnlockedLable.active = true;
        //     this.scheduleOnce(()=>{
        //         noUnlockedLable.active = false;
        //     },2 )
        //     console.log('该关卡还未解锁');
        //     return
        // }
        cc.director.loadScene('game');
        console.log('输出全局关卡数值：',DataMangrt.level);
    }

    // update (dt) {},
});
